package java0416;

public class HeroTest {

    public  static void main(String[] args){
        //创建英雄的对象: 类型 对象名 = new 类型()"
        Hero hero = new Hero();
        //调用英雄的属性，给属性复制   对象名.属性 = 值;
        hero.name = "黄忠";
        hero.level = 8;
        hero.hp = 800;
        hero.mp = 200;
        hero.attackvalue = 150;
        //调用英雄的方法    对象名.方法();
        hero.attack();
        hero.run();

        Hero hero2 = new Hero();
        hero2.name = "赵云";
        hero2.level = 10;
        hero2.hp = 1200;
        hero2.mp = 300;
        hero2.attackvalue = 200;
        hero2.attack();
        hero2.run();

    }



}
